<template>
  <div class="new_liebiao_1">
    <navi>
      <NuxtLink to="/case" v-if="data.data.lanmu.id == 4">
        {{ data.data.lanmu.name }}
      </NuxtLink>
      <NuxtLink to="/case" v-if="data.data.lanmu.id != 4">
        {{ data.data.lanmu.name }}
      </NuxtLink>
    </navi>
    <div class="new_liebiao_2">
      <h1>{{ data.data.biaoti }}</h1>
      <div class="info">
        <small>来源:</small>{{ data.data.laiyuan }}
        <small>观看:</small>{{ data.data.hits }}次 {{ data.data.createTime }}
      </div>
      <div class="h1_body" v-html="data.data.neirong"></div>
    </div>
  </div>
  <div style="clear: both"></div>
</template>

<script setup lang="ts">
const route = useRoute()
const runtimeConfig = useRuntimeConfig();
const { data }: any = await useFetch(runtimeConfig.public.apiBase + "/news/" + route.params.id);
</script>

<style scoped>
.new_liebiao_1 {
  width: 965px;
  height: auto;
  border: #c9c9c9 1px solid;
  margin: 0 auto;
}

.new_liebiao_2 {
  width: 910px;
  margin: 0 auto;
  min-height: 500px;
  height: auto;
  margin-top: 10px;
  margin-bottom: 30px;
}

.info {
  text-align: center;
  padding: 5px 0;
  clear: both;
}

.info small {
  font-size: 12px;
}

.new_liebiao_2 h1 {
  width: 910px;
  font-size: 16px;
  color: #cc0000;
  margin-bottom: 5px;
  text-align: center;
}

.new_liebiao_2 h1_body {
  padding: 15px;
  line-height: 25px;
  text-align: center;
}
</style>